home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / ibmcom.zip / CIRC_BUF.H next >
Text File  |  1987-12-26  |  809b  |  20 lines

  1. /* Include file for circ_buf.c and  programs that use circular buffer
  2.     routines.
  3.  
  4.     Contains structure definitions for a circular buffer.
  5.                                                                     */
  6.     typedef struct {    
  7.         char *address;            /* begining address of buffer */
  8.         char *end;                /* end address of circular buffer */
  9.         int length;                /* length in bytes of circular buffer */
  10.         char *head;                /* head pointer of newest or first byte is */
  11.         char *tail;                /* tail pointer of oldest or last byte is */
  12.         int char_count;        /* number of characters in buffer */
  13.         char overflow_flag;    /* overflow flag, set if too many characters..*/
  14.                                     /* ...have tried to be put in buffer..*/
  15.                                     /* ...(set by interrupt "in" routines if buffer ..*/
  16.                                     /* ... is used for interrupt "in" routines) */
  17.         }circ_buffer_description;
  18.  
  19.  
  20.